check the os in python

50

check the os in python -

from sys import platform
if platform == "linux" or platform == "linux2":
    # linux
elif platform == "darwin":
    # OS X
elif platform == "win32":
    # Windows...

Comments

Submit
0 Comments